import { create, update, remove, query } from '../../../../../../framework/service/index';

export default {

  namespace: 'myPartTimeDetail',

  state: {
    date: [],
  },

  subscriptions: {
    setup({ dispatch, history }) {
      history.listen(location => {
        if(location.pathname === '/my-part-time-detail') {
          dispatch({
            type: 'query',
          })
        }
      })
    },
  },



  effects: {
    *query({ payload }, { call, put }) {
      // const { code, data, message } = yield call(query, '/api/members/list', {});
      // yield put({
      //   type: 'querySuccess',
      //   payload: {
      //     list: personData
      //   }
      // })
    }
  },

  reducers: {
    querySuccess(state, action) {
      return { ...state, ...action.payload };
    },
  }

};
